

package com.uit.ecommerce.bo;

import com.uit.ecommerce.access.mapper.WeatherCityMapper;
import com.uit.ecommerce.dto.WeatherCityDTO;
import java.util.ArrayList;

public class WeatherCityBO {
  public ArrayList<WeatherCityDTO> GetAllWeatherCity() throws Exception{
      WeatherCityMapper WCM=new WeatherCityMapper();
      return WCM.GetAllWeatherArea();
  }
   public void insertWeatherCity(WeatherCityDTO cls) throws Exception{
       WeatherCityMapper WCM=new WeatherCityMapper();
       WCM.insertWeatherCity(cls);
   }
   public void DeleteWeatherCity(WeatherCityDTO cls) throws Exception{
        WeatherCityMapper WCM=new WeatherCityMapper();
        WCM.DeleteWeatherCity(cls);
   }

   public void DeleteByCityId(String cityId) throws Exception{
        WeatherCityMapper mapper = new WeatherCityMapper();
        mapper.DeleteByCityId(cityId);
   }

   public boolean  checkWeatherCityExit(WeatherCityDTO cls) throws Exception{
        WeatherCityMapper WCM=new WeatherCityMapper();
        return WCM.checkWeatherCityExit(cls);
   }
   public ArrayList<WeatherCityDTO> GetAllWeatherCityByName(String city) throws Exception{
        WeatherCityMapper WCM=new WeatherCityMapper();
        return WCM.GetAllWeatherCityByName(city);
   }
   public ArrayList<WeatherCityDTO> GetAllWeatherCityByID(String Id) throws Exception{
       WeatherCityMapper WCM=new WeatherCityMapper();
       return WCM.GetAllWeatherCityByID(Id);
   }
   public ArrayList<WeatherCityDTO> GetAllWeatherCityByDate(String Date) throws Exception{
       WeatherCityMapper WCM=new WeatherCityMapper();
       return WCM.GetAllWeatherCityByDate(Date);
   }
   public WeatherCityDTO GetWeatherCityByDateAndName(String Date,String city) throws Exception{
       WeatherCityMapper WCM=new WeatherCityMapper();
       return WCM.GetWeatherCityByDateAndName(Date, city);
   }
   public WeatherCityDTO GetWeatherCityMinTemp(String CiTyCode) throws Exception{
       WeatherCityMapper WCM=new WeatherCityMapper();
       return WCM.GetWeatherCityMinTemp(CiTyCode);
   }
   public WeatherCityDTO GetWeatherCityMaxTemp(String CiTyCode) throws Exception{
       WeatherCityMapper WCM=new WeatherCityMapper();
       return WCM.GetWeatherCityMaxTemp(CiTyCode);
   }
}
